using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Numerics;
using Nethereum.Hex.HexTypes;
using Nethereum.ABI.FunctionEncoding.Attributes;
using Nethereum.RPC.Eth.DTOs;
using Nethereum.Contracts.CQS;
using Nethereum.Contracts;
using System.Threading;
using MyProject.Contracts.MyWorld.Systems.IncrementSystem.ContractDefinition;

namespace MyProject.Contracts.MyWorld.Systems.IncrementSystem.ContractDefinition
{


    public partial class IncrementSystemDeployment : IncrementSystemDeploymentBase
    {
        public IncrementSystemDeployment() : base(BYTECODE) { }
        public IncrementSystemDeployment(string byteCode) : base(byteCode) { }
    }

    public class IncrementSystemDeploymentBase : ContractDeploymentMessage
    {
        public static string BYTECODE = "0x608060405234801561001057600080fd5b506110e3806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806345ec93541161005057806345ec9354146100c1578063d09de08a146100d4578063e1af802c146100f157600080fd5b806301ffc9a71461006c578063119df25f14610094575b600080fd5b61007f61007a366004610da1565b6100f9565b60405190151581526020015b60405180910390f35b61009c610192565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161008b565b604051601f19360135815260200161008b565b6100dc6101a1565b60405163ffffffff909116815260200161008b565b61009c6101c6565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fb5dee12700000000000000000000000000000000000000000000000000000000148061018c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b600061019c6101d0565b905090565b6000806101ac610202565b905060006101bb826001610e12565b905061018c81610269565b600061019c610308565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcc36013560601c806101ff5750335b90565b60408051600080825260208201909252600061025f7f74620000000000000000000000000000436f756e74657200000000000000000083837e04010004000000000000000000000000000000000000000000000000000000610312565b60e01c9392505050565b60408051600080825260208201835260e084901b7fffffffff00000000000000000000000000000000000000000000000000000000168284015282518083036024018152604483019093529091610304917f74620000000000000000000000000000436f756e746572000000000000000000918491907e040100040000000000000000000000000000000000000000000000000000006103f1565b5050565b600061019c6104c1565b60008061031d6104c1565b90503073ffffffffffffffffffffffffffffffffffffffff821603610350576103488686868661050d565b9150506103e9565b6040517f8c364d5900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821690638c364d59906103a8908990899089908990600401610e72565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103489190610ea1565b949350505050565b60006103fb6104c1565b90503073ffffffffffffffffffffffffffffffffffffffff82160361042c576104278686868686610543565b6104b9565b6040517f390baae000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063390baae0906104869089908990899089908990600401610f00565b600060405180830381600087803b1580156104a057600080fd5b505af11580156104b4573d6000803e3d6000fd5b505050505b505050505050565b7f629a4c26e296b22a8e0856e9f6ecb2d1008d7e00081111962cd175fa7488e1755460009073ffffffffffffffffffffffffffffffffffffffff1680610508573391505090565b919050565b600061053a61051c868661055f565b60ff858116601b0360080285901c1661053585876105b5565b6105ee565b95945050505050565b610558858561055284876105b5565b8561063f565b5050505050565b60008282604051602001610574929190610f47565b60408051601f1981840301815291905280516020909101207f86425bff6b57326c7859e89024fe4f238ca327a1ae4a230180dd2f0e88aaa7d9189392505050565b600080805b8360ff168110156105e6576105dc60ff601b83900360080287901c1683610f83565b91506001016105ba565b509392505050565b6000602082106106145760208204840193506020828161061057610610610f96565b0691505b508254600882021b6020829003808411156105e6576001850154600882021c82179150509392505050565b7f6f74000000000000000000000000000000000000000000000000000000000000847fffff00000000000000000000000000000000000000000000000000000000000016036106c957837f8c0b5119d4cec7b284c6b1b39252a03d1e2f2d7451a5895562524c113bb952be8484846040516106bc93929190610fc5565b60405180910390a26108de565b60006106d5858561055f565b905060006106e2866108e4565b905060005b81518110156107b757600082828151811061070457610704611002565b602002602001015190506107306004826affffffffffffffffffffff191661096d90919063ffffffff16565b156107ae576040517f964f667d000000000000000000000000000000000000000000000000000000008152606082901c9063964f667d9061077b908b908b908b908b90600401611031565b600060405180830381600087803b15801561079557600080fd5b505af11580156107a9573d6000803e3d6000fd5b505050505b506001016106e7565b50857f8c0b5119d4cec7b284c6b1b39252a03d1e2f2d7451a5895562524c113bb952be8686866040516107ec93929190610fc5565b60405180910390a2610807828565ffffffffffff168561098b565b60005b81518110156108da57600082828151811061082757610827611002565b602002602001015190506108536008826affffffffffffffffffffff191661096d90919063ffffffff16565b156108d1576040517fa8ba8721000000000000000000000000000000000000000000000000000000008152606082901c9063a8ba87219061089e908b908b908b908b90600401611031565b600060405180830381600087803b1580156108b857600080fd5b505af11580156108cc573d6000803e3d6000fd5b505050505b5060010161080a565b5050505b50505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061091e5761091e611002565b602090810291909101015260006109567f746273746f726500000000000000000053746f7265486f6f6b7300000000000083836109a6565b90506103e961096882600084516109e0565b610a77565b60008160ff168261097e8560581c90565b1660ff1614905092915050565b6109a18383835161099c8560200190565b610a8f565b505050565b60606103e96109b6858585610b4e565b60006109db856109c68989610bce565b9060ff166028026038011c64ffffffffff1690565b610be1565b6000818311806109f05750835182115b15610a36578383836040517f23230fa3000000000000000000000000000000000000000000000000000000008152600401610a2d93929190611075565b60405180910390fd5b60208401610a448482610f83565b90506000610a52858561109a565b6fffffffffffffffffffffffffffffffff1660809290921b9190911795945050505050565b60606000610a888360156000610c04565b9392505050565b8215610b095760208310610ab957602083048401935060208381610ab557610ab5610f96565b0692505b8215610b095760208390036000600019600885021c1990506008850281811c91508351811c9050811987541682821617875550818411610afa5750506108de565b50600194909401939182900391015b5b60208210610b2b5780518455600190930192601f1990910190602001610b0a565b81156108de576000600019600884021c8554835182191691161785555050505050565b60008383604051602001610b63929190610f47565b604051602081830303815290604052805190602001208260f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f3b4102da22e32d82fc925482184f16c09fd4281692720b87d124aef6da48a0f1181860001c90509392505050565b6000610a88610bdd8484610c7f565b5490565b60405160208101601f19603f84840101166040528282526105e685858584610cd5565b60606000610c128560801c90565b90506fffffffffffffffffffffffffffffffff85166000858281610c3857610c38610f96565b04905060405193506020840160208202810160405281855260005b82811015610c73578451871c825293870193602090910190600101610c53565b50505050509392505050565b60008282604051602001610c94929190610f47565b60408051601f1981840301815291905280516020909101207f14e2fcc58e58e68ec7edc30c8d50dccc3ce2714a623ec81f46b6a63922d76569189392505050565b8215610d5c5760208310610cff57602083048401935060208381610cfb57610cfb610f96565b0692505b8215610d5c576020839003600081841015610d225750600019600884021c610d2c565b50600019600882021c5b8554600886021b818451168219821617845250818411610d4d5750506108de565b50600194909401939182900391015b5b60208210610d7e5783548152600190930192601f1990910190602001610d5d565b81156108de576000600019600884021c8251865482191691161782525050505050565b600060208284031215610db357600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a8857600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff818116838216019080821115610e2f57610e2f610de3565b5092915050565b60008151808452602080850194506020840160005b83811015610e6757815187529582019590820190600101610e4b565b509495945050505050565b848152608060208201526000610e8b6080830186610e36565b60ff949094166040830152506060015292915050565b600060208284031215610eb357600080fd5b5051919050565b6000815180845260005b81811015610ee057602081850181015186830182015201610ec4565b506000602082860101526020601f19601f83011685010191505092915050565b85815260a060208201526000610f1960a0830187610e36565b60ff861660408401528281036060840152610f348186610eba565b9150508260808301529695505050505050565b8281526000602080830184516020860160005b82811015610f7657815184529284019290840190600101610f5a565b5091979650505050505050565b8082018082111561018c5761018c610de3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b606081526000610fd86060830186610e36565b65ffffffffffff851660208401528281036040840152610ff88185610eba565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b84815260806020820152600061104a6080830186610e36565b65ffffffffffff85166040840152828103606084015261106a8185610eba565b979650505050505050565b6060815260006110886060830186610eba565b60208301949094525060400152919050565b8181038181111561018c5761018c610de356fea2646970667358221220921c114bbc574c3359aeaaed21e27aa27c50f070fa6f364112db70b34304005a64736f6c63430008180033";
        public IncrementSystemDeploymentBase() : base(BYTECODE) { }
        public IncrementSystemDeploymentBase(string byteCode) : base(byteCode) { }

    }

    public partial class MsgSenderFunction : MsgSenderFunctionBase { }

    [Function("MyWorld___msgSender", "address")]
    public class MsgSenderFunctionBase : FunctionMessage
    {

    }

    public partial class MsgValueFunction : MsgValueFunctionBase { }

    [Function("MyWorld___msgValue", "uint256")]
    public class MsgValueFunctionBase : FunctionMessage
    {

    }

    public partial class WorldFunction : WorldFunctionBase { }

    [Function("MyWorld___world", "address")]
    public class WorldFunctionBase : FunctionMessage
    {

    }

    public partial class IncrementFunction : IncrementFunctionBase { }

    [Function("MyWorld__increment", "uint32")]
    public class IncrementFunctionBase : FunctionMessage
    {

    }

    public partial class SupportsInterfaceFunction : SupportsInterfaceFunctionBase { }

    [Function("MyWorld__supportsInterface", "bool")]
    public class SupportsInterfaceFunctionBase : FunctionMessage
    {
        [Parameter("bytes4", "interfaceId", 1)]
        public virtual byte[] InterfaceId { get; set; }
    }

    public partial class MsgSenderOutputDTO : MsgSenderOutputDTOBase { }

    [FunctionOutput]
    public class MsgSenderOutputDTOBase : IFunctionOutputDTO 
    {
        [Parameter("address", "sender", 1)]
        public virtual string Sender { get; set; }
    }

    public partial class MsgValueOutputDTO : MsgValueOutputDTOBase { }

    [FunctionOutput]
    public class MsgValueOutputDTOBase : IFunctionOutputDTO 
    {
        [Parameter("uint256", "value", 1)]
        public virtual BigInteger Value { get; set; }
    }

    public partial class WorldOutputDTO : WorldOutputDTOBase { }

    [FunctionOutput]
    public class WorldOutputDTOBase : IFunctionOutputDTO 
    {
        [Parameter("address", "", 1)]
        public virtual string ReturnValue1 { get; set; }
    }



    public partial class SupportsInterfaceOutputDTO : SupportsInterfaceOutputDTOBase { }

    [FunctionOutput]
    public class SupportsInterfaceOutputDTOBase : IFunctionOutputDTO 
    {
        [Parameter("bool", "", 1)]
        public virtual bool ReturnValue1 { get; set; }
    }

    public partial class StoreSplicestaticdataEventDTO : StoreSplicestaticdataEventDTOBase { }

    [Event("Store_SpliceStaticData")]
    public class StoreSplicestaticdataEventDTOBase : IEventDTO
    {
        [Parameter("bytes32", "tableId", 1, true )]
        public virtual byte[] TableId { get; set; }
        [Parameter("bytes32[]", "keyTuple", 2, false )]
        public virtual List<byte[]> KeyTuple { get; set; }
        [Parameter("uint48", "start", 3, false )]
        public virtual ulong Start { get; set; }
        [Parameter("bytes", "data", 4, false )]
        public virtual byte[] Data { get; set; }
    }

    public partial class SliceOutofboundsError : SliceOutofboundsErrorBase { }

    [Error("Slice_OutOfBounds")]
    public class SliceOutofboundsErrorBase : IErrorDTO
    {
        [Parameter("bytes", "data", 1)]
        public virtual byte[] Data { get; set; }
        [Parameter("uint256", "start", 2)]
        public virtual BigInteger Start { get; set; }
        [Parameter("uint256", "end", 3)]
        public virtual BigInteger End { get; set; }
    }
}
